<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="fragments/layout(title='收费项目-收费单详细信息',cssPaths='/static/css/financial/receipt/detail.css',jsPaths='/static/js/financial/receipt/add.js')">
<div class="right" th:fragment="right">
            <!--面包屑-->
            <div class="breadcrumb layui-bg-gray">
                <span class="layui-breadcrumb" lay-separator=">">
                    <a th:href="@{/}">首页</a>
                        <a href="/receipt">收费管理</a>
                        <a href="/receipt">收费项目</a>
                        <a><cite>收费单详细信息</cite></a>
                </span>
            </div>

            <!--主体内容区-->
            <div class="form-content">
                <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                    <legend>收费项目信息</legend>
                </fieldset>
                <div class="layui-row">
                    <!--<div class="layui-col-md4">
                        <span class="field">收费单号：</span>
                        <span class="value" th:text="${receipt.code}"></span>
                    </div>-->
                    <div class="layui-col-md3">
                        <span class="field">所属老人：</span>
                        <span class="value" th:text="${receipt.elderlyName}"></span>
                    </div>
                    <div class="layui-col-md3">
                        <span class="field">收费名称：</span>
                        <span class="value" th:text="${receipt.name}"></span>
                    </div>
                    <div class="layui-col-md3">
                        <span class="field">状态：</span>
                        <span class="value" th:if="${receipt.status == 1}" >待支付</span>
                        <span class="value" th:if="${receipt.status == 3}" >已支付</span>
                        <span class="value" th:if="${receipt.status == 4}" >预期</span>
                        <span class="value" th:if="${receipt.status == 5}" >作废</span>
                    </div>
                </div>
                <div class="layui-inline"></div>
                <div class="layui-row">
                    <div class="layui-col-md3">
                        <span class="field">应收金额：</span>
                        <span class="value" th:text="'￥'+${receipt.amount}"></span>
                    </div>
                    <div class="layui-col-md3">
                        <span class="field">实收金额：</span>
                        <span class="value" th:text="'￥'+${receipt.realAmount ?: 0}"></span>
                    </div>
                    <div class="layui-col-md3">
                        <span class="field">缴费时间：</span>
                        <span class="value" th:text="${#dates.format(receipt.paymentTime, 'yyyy-MM-dd')}"></span>
                    </div>
                </div>
            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend>收费内容</legend>
            </fieldset>

            <div class="layui-row">
                <div class="layui-col-md5">
                    <table class="layui-table">
                        <tr>
                            <th>名称</th>
                            <th>费用</th>
                        </tr>
                        <tr th:each="item : ${items}">
                            <td th:text="${item.name}"></td>
                            <td th:text="'￥'+${item.monery}"></td>
                        </tr>
                    </table>
                </div>
            </div>
            <a  href="/receipt" class="layui-btn">返回</a>
        </div>
</div>

</html>